package com.wjk.kylin.modules.system.vo;

import com.wjk.kylin.modules.system.dict.entity.DictValue;
import com.wjk.kylin.modules.system.position.entity.Position;
import com.wjk.kylin.modules.system.role.entity.Role;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

/**
 * <p>
 * 选择列表 VO
 * </p>
 *
 * @author wangjkui
 * @date 2020/5/22
 */
@Data
@ToString
public class ListSelectVO implements Serializable{
    private static final long serialVersionUID = 1L;

    /** 键值 */
    private String value;

    /** 标签 */
    private String label;

    public ListSelectVO() {

    }

    public ListSelectVO(Role role) {
        this.value = role.getId();
        this.label = role.getName();
    }

    public ListSelectVO(Position position) {
        this.value = position.getId();
        this.label = position.getName();
    }

    public ListSelectVO(DictValue dictValue) {
        this.value = dictValue.getValue();
        this.label = dictValue.getLabel();
    }

}
